The United States has one of the highest teenage birth rate compared to other developed countries (Wind, 2015). The teenage birth rate can be defined as the number of live births per thousand females between the ages of 15-19, per year. From my personal experience in high school I remember a very rudimentary sexual education class stressing abstinence which in no way prepared me or any of my peers with sufficient knowledge to prevent pregnancy or Sexually Transmitted Diseases (STDs). My reflections on the United States sexual education policy in states led me to think about how and if there is a pattern in teenage birth rates by location. This led me to develop the following research question: What is the geospatial relationship of the birth rate of teenagers in the United States? Examining this spatial relationship is crucial to see if there are clusters of counties that are correlated. I also want to overlay the sexual education policy by state to observe if it is a variable that warrants future research of a spatial regression.
What is the geospatial relationship of the birth rate of teenagers in the United States?
library(terra) |> suppressMessages()
## Warning: package 'terra' was built under R version 4.2.3
library(tmap)|> suppressMessages()
library(stringr) |> suppressMessages()
## Warning: package 'stringr' was built under R version 4.2.3
library(spdep) # package for spatial dependence
## Warning: package 'spdep' was built under R version 4.2.3
## Loading required package: spData
## Warning: package 'spData' was built under R version 4.2.3
## Loading required package: sf
## Warning: package 'sf' was built under R version 4.2.3
## Linking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE
library(sf)|> suppressMessages()
library(dplyr)|> suppressMessages()
## Warning: package 'dplyr' was built under R version 4.2.3
library(tidyverse)|> suppressMessages()
## Warning: package 'tidyverse' was built under R version 4.2.3
## Warning: package 'ggplot2' was built under R version 4.2.3
## Warning: package 'tibble' was built under R version 4.2.3
## Warning: package 'tidyr' was built under R version 4.2.3
## Warning: package 'readr' was built under R version 4.2.3
## Warning: package 'purrr' was built under R version 4.2.3
## Warning: package 'forcats' was built under R version 4.2.3
## Warning: package 'lubridate' was built under R version 4.2.3
library(maps)|> suppressMessages()
## Warning: package 'maps' was built under R version 4.2.3
library(readxl)|> suppressMessages()
## Warning: package 'readxl' was built under R version 4.2.3
library(tigris)
## Warning: package 'tigris' was built under R version 4.2.3
## To enable caching of data, set `options(tigris_use_cache = TRUE)`
## in your R script or .Rprofile.
##
## Attaching package: 'tigris'
## The following object is masked from 'package:terra':
##
## blocks
library(ggplot2)
library(ggpattern)
## Warning: package 'ggpattern' was built under R version 4.2.3
library(tidycensus)
## Warning: package 'tidycensus' was built under R version 4.2.3
options(tigris_use_cache = TRUE)
I used data from the US census to get the US geospatial data. For teenage birth rates by county I used data from the National Center for Health Statistics and filtered it to 2016. I chose this year since it was also the year I was able to get data on sexual education policy by states from the Guttmacher Institute.
# Load state and county data
states <- tigris::states(cb = TRUE, class = "sf")
## Retrieving data for the year 2021
counties <- tigris::counties(cb = TRUE, class = "sf")
## Retrieving data for the year 2022
# cb = TRUE for a low-resolution version for faster processing
# Visualize the map with state and county boundaries
all_sf <- bind_rows(
mutate(states, type = "state"),
mutate(counties, type = "county")
)
mapview::mapview(all_sf)